import 'dart:convert';
import 'package:love_app/common/su_dio.dart';
import 'package:love_app/config/path_url.dart';
import 'package:love_app/service/base_api.dart';

class VerifyToekn extends BaseApi{
  Future<bool> verfyToken(String token)async{
    String path = PathUrl.basePath('verify_login');
    Map headerMap = {
      'X-Auth-Token': token,
    };
    return await SuRequest().getRequest(path, headersMap: headerMap).then((value){
      Map data = json.decode(value.toString());
      return isSuccess(data);
    }).catchError((error){
      // 出现异常
      // dioError(error);
      return false;
    });
  }
}